#pragma once

#include "ButtonEx.h"
#include <map>
using namespace std;

// #include <vector>
// typedef vector<CButtonEx*> vpButton;



typedef map<int,CButtonEx*>button_map;
// CListCtrlEx

class CListCtrlEx : public CListView//CListCtrl
{
	DECLARE_DYNAMIC(CListCtrlEx)

public:
	CListCtrlEx();
	virtual ~CListCtrlEx();

protected:
//	DECLARE_MESSAGE_MAP()

public:
	void createItemButton( int nItem, int nSubItem, HWND hMain,CRect re,CString str="" );
	void release();
	void deleteItemEx( int nItem );
	button_map m_mButton;
	void deleteItemButton( int nItem );
	
	CButtonEx* m_btn;
	int m_nButtonNum;

	int init(int n);
	int repaint();
	int deletall();

public:
	UINT m_uID;


	//void updateListCtrlButtonPos();
	//void enableButton( BOOL bFlag, int iItem );
};


